From: Platonides Date: Wed, 29 Jun 2011 17:20:47 +0000 (+0000) Subject: Make a sidebar key with value false mean 'skip this header'. X-Git-Tag: 1.31.0-rc.0~29192 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=b439ecb76ceba1cb4232ca546c16bbee3fe05153;p=lhc%2Fweb%2Fwiklou.git Make a sidebar key with value false mean 'skip this header'. Intended for the forced headers, such as SEARCH. These entries would be added using SkinBuildSidebar hook. --- diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 61e086d344..3e97af1249 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -180,6 +180,9 @@ echo $footerEnd; if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true; foreach ($sidebar as $boxName => $cont) { + if ( $cont === false ) + continue; + if ( $boxName == 'SEARCH' ) { $this->searchBox(); } elseif ( $boxName == 'TOOLBOX' ) { diff --git a/skins/Vector.php b/skins/Vector.php index c90c49a6c3..167a3ecfcd 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -274,6 +274,9 @@ class VectorTemplate extends BaseTemplate { } // Render portals foreach ( $portals as $name => $content ) { + if ( $cont === false ) + continue; + echo "\n\n"; switch( $name ) { case 'SEARCH':